package com.aster.common.exception;

public class ServiceException extends Exception {
    /**
     * 异常代码
     */
    private int code;
    /**
     * 异常消息
     */
    private String msg;

    public ServiceException(int _code, String _msg){
        this.code = _code;
        this.msg = _msg;
    }


    /**
     * 获取 异常代码
     *
     * @return code 异常代码
     */
    public int getCode() {
        return this.code;
    }

    /**
     * 设置 异常代码
     *
     * @param code 异常代码
     */
    public void setCode(int code) {
        this.code = code;
    }

    /**
     * 获取 异常消息
     *
     * @return msg 异常消息
     */
    public String getMsg() {
        return this.msg;
    }

    /**
     * 设置 异常消息
     *
     * @param msg 异常消息
     */
    public void setMsg(String msg) {
        this.msg = msg;
    }
}
